﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Mapping;

namespace Managistics.Model.Mappings
{
    public class CountryMap : ClassMap<Country>
    {

        public CountryMap()
        {
            Schema(Constants._tblSchema);
            Table(Constants._tblCountry);
            LazyLoad();

            Id(x => x.Code).GeneratedBy.Assigned().Column("COUNTRYID");

            Map(x => x.Name).Column("COUNTRYNAME").Not.Nullable().Length(100);
            Map(x => x.Capital).Column("CAPITAL").Length(50);
            Map(x => x.Monetary).Column("MONETARY").Length(10);
        }
    }
}
